﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SPMS.Commons.Configuration;

namespace SPMS.Log.Configuration
{
    /// <summary>
    /// 标签解析器注册接口
    /// </summary>
    /// <remarks></remarks>
    /// <history>
    /// [zanezeng]   2008-11-17 8:39    Created
    /// </history>
    public interface INodeHandlerRegistry : IConfigurationNodeHandlerFactory<ParseContext>
    {
        #region ---Property

        /// <summary>
        /// 通过指定的标记获得或者设置标签解析器
        /// </summary>
        /// <value>标签解析器</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-17 8:48    Created
        /// </history>
        IConfigurationNodeHandler<ParseContext> this[string tagName]
        {
            get;
            set;
        }

        #endregion

        #region ---Method

        /// <summary>
        /// 注册节点处理器
        /// </summary>
        /// <param name="tagName">配置标记名称</param>
        /// <param name="handler">需要注册的节点处理器</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]   2008-11-17 8:44    Created
        /// </history>
        void RegisterNodeHandler(string tagName, IConfigurationNodeHandler<ParseContext> handler);

        #endregion
    }
}
